package com.ggs.rg.ybjb.systemmodule;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;

//exclude= {DataSourceAutoConfiguration.class}
@SpringBootApplication()
@MapperScan("com.ggs.rg.ybjb.systemmodule.mapper")
@EnableDiscoveryClient //开启springcloud alibaba的nacos的注解
@EnableFeignClients    //开启springcloud alibaba的sentinel整合feign的注解
public class SystemModule80Application extends SpringBootServletInitializer {


    public static void main(String[] args) {
        SpringApplication.run(SystemModule80Application.class, args);
    }

    /*
     *  配置外部tommcat
     */
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        // 注意这里要指向原先用main方法执行的Application启动类
        return application.sources(SystemModule80Application.class);
    }


}
